package com.pro.common.jwt;

import com.pro.common.api.enums.EnumSysRole;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Collections;
import java.util.Map;

@Component
@ConfigurationProperties(prefix = "spring.security.jwt")
@Data
public class JwtProperties {

    /**
     * token在cookies中存储的键值
     */
    private String tokenCookieKey;

    /**
     * jwt秘钥
     */
    private String secretKey;
    /**
     * 角色token默认时效(秒)
     */
    private Map<EnumSysRole, Integer> roleSecondMap = Collections.emptyMap();
}
